package com.meteor.util;

import com.meteor.pojo.Blog;

import java.util.Date;

public class BlogBean extends Blog implements Comparable<BlogBean>{

    private Long id;
    private String title;
    private String name;
    private String typeName;
    private String tagName;
    private Boolean recommend;
    private String updateTime;
    private String createTime;

    @Override
    public String getCreateTime() {
        return createTime;
    }

    @Override
    public void setCreateTime(String createTime) {
        this.createTime = createTime;
    }

    public String getTagName() {
        return tagName;
    }

    public void setTagName(String tagName) {
        this.tagName = tagName;
    }

    public String getTypeName() {
        return typeName;
    }

    public void setTypeName(String typeName) {
        this.typeName = typeName;
    }

    @Override
    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @Override
    public String getTitle() {
        return title;
    }

    @Override
    public void setTitle(String title) {
        this.title = title;
    }

    @Override
    public Boolean getRecommend() {
        return recommend;
    }

    public void setRecommend(Boolean recommend) {
        this.recommend = recommend;
    }

    @Override
    public String getUpdateTime() {
        return updateTime;
    }

    @Override
    public void setUpdateTime(String updateTime) {
        this.updateTime = updateTime;
    }

    @Override
    public int compareTo(BlogBean o) {
        Integer i = Math.toIntExact(this.id - o.id);
        Integer j = Math.toIntExact(o.id - this.id);
        if(i > 0) return j;
        else return i;
    }
}
